package com.only4play.practice.invoice.core.envents;

import com.only4play.practice.invoice.api.model.OrderRegisterModel;
import com.only4play.practice.invoice.api.model.OrderRegisterResultModel;
import com.only4play.practice.invoice.core.entity.OrderReceipt;
import lombok.Value;

import java.util.List;

public interface OrderReceiptEvents {

  @Value
  class OrderRegisterEvent {

    OrderReceipt orderReceipt;
    OrderRegisterModel orderRegisterModel;
    OrderRegisterResultModel registerResultModel;

    public OrderRegisterEvent(OrderReceipt orderReceipt, OrderRegisterModel orderRegisterModel, OrderRegisterResultModel registerResultModel) {
      this.orderReceipt = orderReceipt;
      this.orderRegisterModel = orderRegisterModel;
      this.registerResultModel = registerResultModel;
    }
  }

  @Value
  class ReceiptExchangeInvoiceEvent {

     OrderReceipt orderReceipt;
     List<Long> receiptIds;
     String batchNo;

     public ReceiptExchangeInvoiceEvent(OrderReceipt orderReceipt, List<Long> receiptIds, String batchNo) {
       this.orderReceipt = orderReceipt;
       this.receiptIds = receiptIds;
       this.batchNo = batchNo;
     }
  }

}
